﻿
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using YDModel;
using YDServices.Comm;

namespace YDServices
{
    public class PermissionService : BaseService
    {
        /// <summary>
        /// 获取权限列表
        /// </summary>
        public List<T_Permission> getTreeData()
        { 
             try
            {
                using (YDDataEntities db = new YDDataEntities())
                {
                    var list = db.T_Permission.AsQueryable();

                    return list.ToList();
                }
            }
            catch (Exception ex)
            {
                Errors.Add(ex);
                WriteException(ex);
                return null;
            }
        }

        
    }
}
